<template>
	<view class=" round-8 overflow-hidden  bg-white relative text-white " v-for="(detail,index) in list"
		:key='detail.id'>
		<view class="flex flex-x-space-between py-8 text-black px-10 border-bottom-f1 flex-y-center gap-6">
			<view class="text-ellipsis-1 fs-16 ">{{detail?.req_content?.content}}
			</view>
			<text class="iconfont icon-fuzhi-" @click="copy(detail.result)"></text>
		</view>
		<view class="w-p-100 flex flex-center h-p-100 flex-column gap-8 bg-white" v-if="detail.status==1">
			<y-loading></y-loading>
			<text class="fs-12 text-666">创建中...</text>
		</view>
		<view v-if="detail.status==2" class="text-333 round-8 p-10 fs-14">
			{{detail.result}}
		</view>
		<view class="absolute bottom-0 left-0 right-0 px-10 py-6 bg">
			<view class="flex flex-x-space-between flex-y-center">
				<text class="fs-12">{{detail.create_time}}</text>
				<text class="iconfont icon-gengduo text-white" @click="emit('more',detail)"></text>
			</view>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({
		list: {
			type: [Object, Array],
			default: []
		}
	})
	const emit = defineEmits(['more'])
	
	
	const copy = (e) => {
		uni.setClipboardData({
			data: e
		})
	}
	
</script>

<style scoped>
	.bg {
		background: rgba(0, 0, 0, 0.5);
		backdrop-filter: blur(10px);
	}
</style>